<script setup lang="ts">
function handleClickLeft() {
  uni.navigateBack()
}
</script>

<template>
  <view class="h-full flex flex-col overflow-hidden">
    <wd-navbar title="添加服务费方案" left-text="返回" left-arrow @click-left="handleClickLeft" />
    <scroll-view
      scroll-y
      class="box-border flex-1 overflow-hidden p-[10px]"
      :show-scrollbar="false"
    >
      <custom-wd-input
        required
        custom-input-class="text-align-right"
        label="方案名称"
        placeholder="10个字以内"
        placeholder-class="text-align-right"
      />
      <custom-wd-input-single-select
        c-class="mt-3"
        custom-input-class="text-align-right"
        label="类型"
        title="请选择"
        placeholder="请选择"
        placeholder-class="text-align-right"
      />
      <custom-wd-input
        c-class="mt-3"
        custom-input-class="text-align-right"
        label="收取金额"
        placeholder="例如 3元每位 填3"
        placeholder-class="text-align-right"
      >
        <template #suffix>
          <wd-text text="元/位" color="#333" size="12" />
        </template>
      </custom-wd-input>
      <wd-cell title="使用桌台" class="mt-3 rounded-lg" value="请选择" is-link />
      <wd-cell title="部门" class="mt-3 rounded-lg" value="请选择" is-link />
      <wd-cell title="POS端手动修改服务费金额" class="mt-3 rounded-lg" title-width="70%" center>
        <view class="inline-block">
          <wd-switch size="20px" />
        </view>
      </wd-cell>
      <view class="mx-[10px] mt-6">
        <wd-text text="高级设置" bold size="16px" color="#333" />
      </view>
      <wd-cell
        title="生效时间"
        class="mt-3 rounded-lg"
        value="永久生效"
        is-link
        to="/pages/serviceCharge/timeSetting"
      />
    </scroll-view>
    <view class="flex border-t-1 border-border border-t-solid bg-white p-4">
      <wd-button class="w-full" :round="false" type="primary">保存</wd-button>
    </view>
  </view>
</template>

<style scoped lang="scss"></style>
